<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/7/27
 * Time: 17:10
 */
namespace app\portal\model;

use app\admin\model\RouteModel;
use think\Model;
use tree\Tree;

class PortalCategoryPostModel extends Model
{
    protected $type = [
        'more' => 'array',
    ];

    public function getPortalCategoryPostId($data)
    {
        //获取所需分类的文章ID
        $condition['category_id'] = array('in',$data);
        $condition['status'] = 1;
        $portalCategoryPostList = $this->where($condition)->select()->toArray();
        $ids = array_column($portalCategoryPostList, 'post_id');
        return $ids;
    }
}
